﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace terrariumGame
{
    class Enemy
    {
        
        public Sprite enemy;
        private float g;

        public Enemy(Sprite enemy)
        {
            this.enemy = enemy;
        }

        public void PhysxUpdate()
        {
            g = g + 0.3f;
            if (enemy.GetPosition().Y > 400)
            {
                g =0- (float) Game1.r.Next(300, 1500)/100;
                enemy.SetPosition(enemy.GetPosition().X,400);
            }
            enemy.AddPosition(0,g);
        }
        
    }
}
